<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/jirui/executesqldictionary/execute_sql_dictionary.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/jirui/executesqldictionary/execute_sql_dictionary.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'execute_sql_dictionary_id',
                footer: "Foots",
                cnName: '执行SQL字典',
                name: 'executesqldictionary/execute_sql_dictionary',
                url: "/execute_sql_dictionary/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"function_page":"","full_route":"","classify_route":"","sql":"","description":"","target_system":"","status":""});
            const editFormOptions = ref([[{"title":"对应页面功能","field":"function_page"},
                               {"title":"完整路由","field":"full_route"},
                               {"title":"路由","field":"classify_route"}],
                              [{"title":"SQL语句","field":"sql","colSize":12,"type":"textarea"}],
                              [{"title":"功能描述","field":"description"},
                               {"title":"目标系统","field":"target_system"},
                               {"dataKey":"enable","data":[],"title":"是否启用","required":true,"field":"status","type":"number"}]]);
            const searchFormFields = ref({"classify_route":"","sql":"","status":""});
            const searchFormOptions = ref([[{"title":"路由","field":"classify_route","type":"text"},{"title":"SQL语句","field":"sql","type":"like"},{"dataKey":"enable","data":[],"title":"是否启用","field":"status","type":"select"}]]);
            const columns = ref([{field:'execute_sql_dictionary_id',title:'后端执行SQL字典表',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'function_page',title:'对应页面功能',type:'string',width:220,align:'left',sort:true},
                       {field:'full_route',title:'完整路由',type:'string',width:220,align:'left'},
                       {field:'classify_route',title:'路由',type:'string',width:220,align:'left'},
                       {field:'sql',title:'SQL语句',type:'string',width:220,align:'left'},
                       {field:'description',title:'功能描述',type:'string',width:220,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Modifier',title:'修改人',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'target_system',title:'目标系统',type:'string',width:220,align:'left'},
                       {field:'status',title:'是否启用',type:'int',bind:{ key:'enable',data:[]},width:110,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
